home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / ToolUtils.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  160 lines

  1. {
  2.      File:        ToolUtils.p
  3.  
  4.      Contains:    Toolbox Utilities Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ToolUtils;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TOOLUTILS__}
  28. {$SETC __TOOLUTILS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ToolUtilsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40. {$IFC OLDROUTINELOCATIONS }
  41. {$IFC UNDEFINED __FIXMATH__}
  42. {$I FixMath.p}
  43. {$ENDC}
  44. {$IFC UNDEFINED __ICONS__}
  45. {$I Icons.p}
  46. {$ENDC}
  47. {$IFC UNDEFINED __QUICKDRAW__}
  48. {$I Quickdraw.p}
  49. {$ENDC}
  50. {$IFC UNDEFINED __TEXTUTILS__}
  51. {$I TextUtils.p}
  52. {$ENDC}
  53. {$ENDC}
  54.  
  55. {$PUSH}
  56. {$ALIGN MAC68K}
  57. {$LibExport+}
  58.  
  59. {
  60. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  61.     Note: 
  62.     
  63.     The following routines that used to be in this header file, have moved to
  64.     more appropriate headers.  If OLDROUTINELOCATIONS is 0, then you will have
  65.     to include the headers below to use the following functions.
  66.     
  67.         FixMath.h:        FixMul
  68.                         FixRatio
  69.                         FixRound
  70.         
  71.         Icons.h:          GetIcon
  72.                         PlotIcon
  73.                         
  74.         Quickdraw.h:    AngleFromSlope
  75.                         DeltaPoint
  76.                         GetCursor
  77.                         GetIndPattern
  78.                         GetPattern
  79.                         GetPicture
  80.                         PackBits
  81.                         ScreenRes
  82.                         ShieldCursor
  83.                         SlopeFromAngle
  84.                         UnpackBits
  85.                         
  86.         TextUtils.h:    Munger
  87.                         GetIndString
  88.                         GetString
  89.                         NewString
  90.                         SetString
  91. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  92. }
  93. {     Used only in the LongMul function. }
  94.  
  95. TYPE
  96.     Int64BitPtr = ^Int64Bit;
  97.     Int64Bit = RECORD
  98.         hiLong:                    SInt32;
  99.         loLong:                    UInt32;
  100.     END;
  101.  
  102. {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
  103. FUNCTION BitTst(bytePtr: UNIV Ptr; bitNum: LONGINT): BOOLEAN;
  104.     {$IFC NOT GENERATINGCFM}
  105.     INLINE $A85D;
  106.     {$ENDC}
  107. PROCEDURE BitSet(bytePtr: UNIV Ptr; bitNum: LONGINT);
  108.     {$IFC NOT GENERATINGCFM}
  109.     INLINE $A85E;
  110.     {$ENDC}
  111. PROCEDURE BitClr(bytePtr: UNIV Ptr; bitNum: LONGINT);
  112.     {$IFC NOT GENERATINGCFM}
  113.     INLINE $A85F;
  114.     {$ENDC}
  115. FUNCTION BitAnd(value1: LONGINT; value2: LONGINT): LONGINT;
  116.     {$IFC NOT GENERATINGCFM}
  117.     INLINE $A858;
  118.     {$ENDC}
  119. FUNCTION BitOr(value1: LONGINT; value2: LONGINT): LONGINT;
  120.     {$IFC NOT GENERATINGCFM}
  121.     INLINE $A85B;
  122.     {$ENDC}
  123. FUNCTION BitXor(value1: LONGINT; value2: LONGINT): LONGINT;
  124.     {$IFC NOT GENERATINGCFM}
  125.     INLINE $A859;
  126.     {$ENDC}
  127. FUNCTION BitNot(value: LONGINT): LONGINT;
  128.     {$IFC NOT GENERATINGCFM}
  129.     INLINE $A85A;
  130.     {$ENDC}
  131. FUNCTION BitShift(value: LONGINT; count: INTEGER): LONGINT;
  132.     {$IFC NOT GENERATINGCFM}
  133.     INLINE $A85C;
  134.     {$ENDC}
  135. {$IFC GENERATING68K }
  136. PROCEDURE LongMul(a: LONGINT; b: LONGINT; VAR result: Int64Bit);
  137.     {$IFC NOT GENERATINGCFM}
  138.     INLINE $A867;
  139.     {$ENDC}
  140. {$ENDC}
  141. FUNCTION HiWord(x: LONGINT): INTEGER;
  142.     {$IFC NOT GENERATINGCFM}
  143.     INLINE $A86A;
  144.     {$ENDC}
  145. FUNCTION LoWord(x: LONGINT): INTEGER;
  146.     {$IFC NOT GENERATINGCFM}
  147.     INLINE $A86B;
  148.     {$ENDC}
  149. {$ENDC}
  150. {$ALIGN RESET}
  151. {$POP}
  152.  
  153. {$SETC UsingIncludes := ToolUtilsIncludes}
  154.  
  155. {$ENDC} {__TOOLUTILS__}
  156.  
  157. {$IFC NOT UsingIncludes}
  158.  END.
  159. {$ENDC}
  160.